import { loginController, registerController } from '../controller/auth'
import { mapRecord } from './router-type'

export const routerPathConfig: mapRecord[] = [
  {
    type: 'post',
    path: '/login',
    controllerFun: loginController
  },
  {
    type: 'post',
    path: '/register',
    controllerFun: registerController,
    configFun: ctx => {
      const { username, password } = ctx.request.body
      return { username, password }
    }
  }
]
